function doUpload() {
    // const formData = new FormData(document.getElementById("uploadForm"));
    const formData = new FormData();
    formData.append("image", document.getElementById("image").files[0]);
    formData.append("goodId", document.getElementById("goodId").value);
    console.log("goodId:" + document.getElementById("goodId").value);
    console.log(document.getElementById("image").files[0]);
    console.log(formData);
    $.ajax({
        url: URL_HEAD_FILE + "/upload",
        type: "post",
        data: formData,
        async: false,
        cache: false,
        contentType: false,
        processData: false,
        success: function (result) {
            alert(result.msg);
        },
        error: function (xhr, textStatus, errorThrown) {
            showError("上传图片异常", xhr, textStatus, errorThrown);
        }
    });

}
